package com.ciei.dpagm.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ciei.dpagm.common.service.BaseService;
import com.ciei.dpagm.entity.ProjectSlaveChipConfig;
import com.ciei.dpagm.mapper.ProjectSlaveChipConfigMapper;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author pp
 * @date 2023/05/09
 */
@Service
public class ProjectSlaveChipConfigService extends BaseService<ProjectSlaveChipConfigMapper, ProjectSlaveChipConfig> {

    /**
     * 获取列表
     * @param componentIdList
     * @return
     */
    public List<ProjectSlaveChipConfig> getList(List<String> componentIdList){
        if(componentIdList.isEmpty()){
            return new ArrayList<>();
        }
        LambdaQueryWrapper<ProjectSlaveChipConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.in(ProjectSlaveChipConfig::getComponentId,componentIdList);
        return list(lambdaQueryWrapper);
    }

}
